package com.hnust.dao;

import com.hnust.domain.questionList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface testRecordDao {
    @Select("SELECT qp.que_id,qt.type " +
            " FROM test t,question_paper qp,question q,question_type qt " +
            " WHERE t.topaperid = qp.pap_id AND qp.que_id = q.que_id AND q.que_typ_id = qt.que_typ_id AND t.testid=#{testID}")
    @ResultType(questionList.class)
    List<questionList> getTestRecord(String testID);
}
